/**
 * @file rank/popularize/luogu1098/main.cpp
 * @brief
 * @see
 * @author Ruiming Guo (guoruiming@stu.scu.edu.cn)
 * @copyright 2022
 * @date 2022/7/7 19:59:01
 **/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
void putc(int start, int end, int rep, bool toUpper, bool toAsterisk,
          bool reverse) {
  if (!reverse)
    for (int i = start + 1; i <= end - 1; ++i) {
      for (int r = 0; r < rep; ++r) {
        if (!isdigit(i)) {
          if (toUpper) {
            putchar(i - 'a' + 'A');
          } else if (toAsterisk) {
            putchar('*');
          } else {
            putchar(i);
          }
        } else {
          if (!toAsterisk)
            putchar(i);
          else
            putchar('*');
        }
      }
    }
  else {
    for (int i = end - 1; i >= start + 1; --i) {
      for (int r = 0; r < rep; ++r) {
        if (!isdigit(i)) {
          if (toUpper) {
            putchar(i - 'a' + 'A');
          } else if (toAsterisk) {
            putchar('*');
          } else {
            putchar(i);
          }
        } else {
          if (!toAsterisk)
            putchar(i);
          else
            putchar('*');
        }
      }
    }
  }
}
const int N = 110;
char s[N];
int main() {
  // High rating and good luck!
  int p1, p2, p3;
  cin >> p1 >> p2 >> p3;
  cin.ignore();
  cin >> s;
  int n = strlen(s);
  for (int i = 0; i < n; ++i) {
    int ch = s[i];
    if (ch != '-') {
      putchar(ch);
    } else {
      int prev, next;
      if (i != 0)
        prev = s[i - 1];
      else {
        putchar('-');
        continue;
      }
      if (i != n - 1)
        next = s[i + 1];
      else {
        putchar('-');
        continue;
      }
      // 同为数字
      if (isdigit(prev) && isdigit(next) && prev < next) {
        putc(prev, next, p2, p1 == 2, p1 == 3, p3 == 2);
      }
      // 同为字母
      else if (islower(prev) && islower(next) && prev < next) {
        putc(prev, next, p2, p1 == 2, p1 == 3, p3 == 2);
      } else {
        putchar('-');
      }
    }
  }
  return 0;
}
